<?php
if (!defined('IN_XLP')) {
    exit('Access Denied');
}
$Document = array(
    'pageid' => 'user-safe', //页面标示
    'pagename' => '', //当前页面名称
    'mycss' => array('index/common','index/style','index/user'), //加载的css样式表
    'myjs' => array('global/jquery-2.2.4.min','global/layer/layer','index/safe'), //加载的js脚本
    'footerjs'=>array(),
    'head'=>true//是否加载头部文件
);
include getTpl('header', 'public');
?>
<body>
<?php include getTpl('small_top' , 'public'); ?>

<div class="container">
    <!-- 头部导航条以及搜索框 -->
    <?php include getTpl('top' , 'public'); ?>
    <?php include getTpl('aside' , 'public'); ?>
    <!-- 账号安全 -->
    <section id="member_safe" class="personal_center">
      <div class="top_line">
          <span class="vip_center_text"> 账号安全 </span>
      </div>
      <div class="row">
        <ul class="row_content">
            <li>
              <svg t="1536568560596" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8398" xmlns:xlink="http://www.w3.org/1999/xlink" width="30" height="30">
                <path class="row_icon" d="M830.293 213.333H193.707A108.587 108.587 0 0 0 85.333 321.707V744.96a108.587 108.587 0 0 0 108.374 108.373h636.586A108.587 108.587 0 0 0 938.667 744.96V321.707a108.587 108.587 0 0 0-108.374-108.374z m62.294 531.627a62.293 62.293 0 0 1-62.294 62.293H193.707a62.293 62.293 0 0 1-62.294-62.293V321.707a62.293 62.293 0 0 1 62.294-62.294h636.586a62.293 62.293 0 0 1 62.294 62.294z" p-id="8399"></path>
                <path class="row_icon" d="M225.707 354.133H330.88v89.6H225.707z m0 128H330.88v89.6H225.707z m151.893-128h105.173v89.6H377.6z m0 128h105.173v89.6H377.6z m-46.72 140.8h362.453v89.6H330.88z m210.347-268.8H646.4v89.6H541.227z m0 128H646.4v89.6H541.227z m151.893-128h105.173v89.6H693.12z m0 128h105.173v89.6H693.12z" p-id="8400"></path>
              </svg>
            </li> 
            <li>
              <span class="row_span1"> 登录密码修改 </span><br />
              <span class="row_span2">密码要求至少包含字母，符号或数字中的两项且长度超过6位，建议您经常修改密码，以保证账号更加安全</span>
            </li>
            <li>
              <button class="row_btn" onclick="changePassword()"> 修改 </button>
            </li>
        </ul>
      </div>
      <div class="row">
        <ul class="row_content">
          <li>
            <svg t="1535443925203" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5615" xmlns:xlink="http://www.w3.org/1999/xlink" width="30" height="30">
              <path class="row_icon" d="M751.036141 162.03542 272.962835 162.03542l0 617.511056 478.073306 0L751.036141 162.03542zM561.799196 112.236224c0-5.477758-4.482081-9.959839-9.959839-9.959839l-99.598392 0c-5.477758 0-9.959839 4.482081-9.959839 9.959839l0 9.959839c0 5.477758 4.482081 9.959839 9.959839 9.959839l99.598392 0c5.477758 0 9.959839-4.482081 9.959839-9.959839L561.799196 112.236224zM512 899.064546c21.912056 0 39.839357-17.927301 39.839357-39.839357s-17.927301-39.839357-39.839357-39.839357c-21.912056 0-39.839357 17.927301-39.839357 39.839357S490.087944 899.064546 512 899.064546zM751.036141 958.823582 272.962835 958.823582c-32.867572 0-59.759035-26.891464-59.759035-59.759035L213.2038 122.196063c0-32.867572 26.891464-59.759035 59.759035-59.759035l478.073306 0c32.867572 0 59.759035 26.891464 59.759035 59.759035l0 776.868483C810.795177 931.932118 783.903713 958.823582 751.036141 958.823582z" p-id="5616"></path>
            </svg>
          </li> 
          <li>
            <span class="row_span1"> 手机绑定修改 </span><br />
            <span class="row_span2"> 您绑定的手机：<?php echo substr_replace(user::$userInfo['phone'], '****', 3, 4); ?> </span>
          </li>
          <li>
            <button class="row_btn" onclick="window.location.href = '<?php echo U("user/safePhone") ?>'"> 修改 </button>
          </li>
        </ul>
      </div>
      <div class="row">
        <ul class="row_content">
          <li>
            <svg t="1536569139806" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1862" xmlns:xlink="http://www.w3.org/1999/xlink" width="30" height="30">
              <path class="row_icon" d="M781.944 374.484c0-72.59-30.38-141.222-79.362-191.357-47.767-48.863-113.21-80.067-185.347-80.067-73.254 0-139.46 29.05-187.344 75.995-47.805 46.865-77.365 111.662-77.365 183.194 0 4.679 0.02 5.05 0.04 5.716l0.195 6.519H212.67c0-3.818-0.04-4.756-0.04-5.422l-0.194-6.813c0-82.632 34.18-157.51 89.443-211.697 55.185-54.107 131.317-87.583 215.357-87.583 83.395 0 158.958 35.961 214.007 92.282 56.028 57.377 90.796 135.995 90.796 219.233h-40.094z" p-id="1863"></path>
              <path class="row_icon" d="M233.89 394.452c-0.02 0-10.884 0.468-8.399 24.099l1.194 11.374-9.26 6.792c-0.019 0.02-13.839 9.945 3.935 35.296l10.846 15.446-14.838 11.726c-0.352 0.294-118.612 91.48-78.422 218.802 14.878-9.044 34.22-24.49 39.329-45.847l18.265-76.21 20.476 75.681c0.078 0.235 23.491 87.955 47.08 103.558l29.972 19.792-32.711 15.035c-0.098 0.058-57.77 6.539-47.786 12l20.672 11.315-14.485 18.52c-0.12 0.155-42.403 53.051 79.733 66.05 145.313 15.464 172.054-33.123 172.133-33.26l5.873-9.788h71.139l4.779 13.31c0.038 0.08 11.155 36.845 151.517 32.674 47.295-1.408 75.25-10.316 90.853-21.848 7.828-5.774 12.04-12.039 13.879-17.99 1.743-5.637 1.448-11.295 0.176-16.033-1.114-4.071-2.034-6.48-2.466-6.733l-25.116-15.368 23.53-17.638c-0.332 0.176-4.582 1.292-51.935-21.298l-26.723-12.764 21.79-20.046c0.116-0.118 44.145-40.093 54.01-94.632l22.004-121.547 17.46 122.232c0 0.078 3.682 24.079 37.393 43.479 16.052-27.23 41.266-104.127-66.324-235.247l-7.243-8.809 3.799-10.61c0.039-0.118 16.325-43.948-22.593-85.41l29.11-27.388c41.992 44.691 38.586 93.3 34.24 114.873 150.774 189.986 49.606 291.605 49.33 291.9l-9.552 9.768-12.53-5.383c-23.256-9.986-39.424-22.787-50.623-35.277-9.944 21.18-22.435 38.721-32.614 51.134 42.44 24.685 49.528 44.947 46.903 58.453a61.765 61.765 0 0 1 6.812 15.974c2.977 11.042 3.603 24.392-0.625 38.114-4.15 13.431-12.82 26.918-28.287 38.35-21.436 15.857-56.906 27.995-113.562 29.68-119.806 3.542-165.221-27.33-181.59-45.83h-26.387c-18.185 18.734-72.08 56.654-202.789 42.736-148.818-15.838-132.512-83.786-116.655-114.814-10.766-20.34 19.655-43.106 42.754-56.79-11.627-17.521-21.573-40.62-28.973-60.609-24.45 26.29-56.693 38.995-56.81 39.035l-18.01 7.204-7.752-17.774c-59.512-136.055 33.593-240.767 69.573-274.498-15.485-32.222-3.68-54.97 5.736-66.441-0.978-55.988 46.298-58.455 46.415-58.455l2.35 39.935z" p-id="1864"></path>
            </svg>
          </li> 
          <li>
            <span class="row_span1"> 第三方绑定修改 </span><br />
            <span class="row_span2"> 您可以使用绑定的第三方应用进行账号登录以及平台交易 </span>
          </li>
          <li>
            <button class="row_btn"> 暂未开通 </button>
          </li>
        </ul>
      </div>
    </section>
    <!-- 账号安全结束 -->
</div>
<?php include getTpl('footer', 'public');  ?>
  <!-- 弹出层 -->
  <div class="out_layer" style="display:none">
    <div class="out_windows">
      <span class="out_title"> 登入密码修改 </span>
      <div class="change_password">
        <div class="change_password_row">
          <span> 原密码 </span>
          <div class="change_password_form">
            <input type="password" name="old_password" id="old_pass" style="width: 100%" placeholder="请输入原密码（不少于6位）" >
          </div>
        </div>
        <div class="change_password_row">
          <span> 新密码 </span>
          <div class="change_password_form">
            <input type="password" name="password_one" id="new_pass" style="width: 100%" placeholder="请输入新密码（不少于6位）" >
          </div>
          <div class="change_password_form">
            <input type="password" name="password_two" id="new_pass_two" style="width: 100%" placeholder="确认输入新密码（不少于6位）" >
          </div>
        </div>
        <!-- <div class="change_password_row">
          <span> 验证码 </span>
          <div class="change_password_form">
            <input type="text" name="" id="" style="width: 40%" placeholder="手机验证码" >
            <button class="get_code" id="check_code" style="width: 140px;border-radius: 0;height: 39px;" onclick="send_check_code(this)"> 获取验证码 </button>
          </div>
        </div> -->
        <div class="change_password_row">
          <div class="change_password_form text_center">
             <button class="sure_change" type="button"> 确认 </button>
             <button class="cancel_change" onclick="hideLayer()"> 取消 </button>
          </div>
        </div>
      </div>
    </div>
  </div>
  <script type="text/javascript">
    $(function(){
        $(".sure_change").click(function(){
            var old_psw  = $("#old_pass").val();
            var psw_one = $("#new_pass").val();
            var psw_two = $("#new_pass_two").val();
            $.post("<?php echo U('user/changePassword') ?>",{old_psw:old_psw,psw_one:psw_one,psw_two:psw_two},function(result){
                if(result.status) {
                    layer.msg(result.info);
                    hideLayer();
                }else{
                    layer.msg(result.info);
                    return false;
                }
            },'json');
            return false;
        });
    });
  </script>
</body>
</html> 